package com.zjj.lbw.ai;

import dev.langchain4j.data.image.Image;
import dev.langchain4j.model.image.ImageModel;
import dev.langchain4j.model.openai.OpenAiImageModel;
import dev.langchain4j.model.output.Response;

public class ImageModelTest {
    public static void main(String[] args) {
        ImageModel imageModel = OpenAiImageModel.builder()
                .baseUrl("http://localhost:3000/v1")
                .apiKey("sk-peszVtFXoLnWK45bB15370Df6f344cAa9a088eF50f9c7302")
                .build();
        Response<Image> response = imageModel.generate("一辆车");
        System.out.println(response.content().url());
    }
}
